<template>
    <div class="home-box">
        <main class="home-main">
            <div class="white-box">
                <head-title title="订单统计"></head-title>
                
            </div>
            <div class="white-box">
                <head-title title="财务统计"></head-title>
                
            </div>
        </main>
        <aside class="home-aside">
            <div class="white-box">
                <head-title title="消息通知" title-size="14px" text="更多" text-size="12px"></head-title>
                
            </div>
        </aside>
    </div>
</template>

<script setup>
import { getCurrentInstance, ref, onActivated, onMounted } from "vue"
import { useRouter, onBeforeRouteLeave } from "vue-router"
import { userStore } from "@store/user"
import HeadTitle from "@components/HeadTitle.vue"
import { WarningFilled } from "@element-plus/icons-vue"

const router = useRouter()
const store = userStore()
const { proxy } = getCurrentInstance()

// 离开-可以利用这个触发删除页面缓存操作
onBeforeRouteLeave((to, from, next) => {
    if (from.name === "Home") {
        store.setInclude("Home")
    }
    next()
})
// keep-alive缓存页面后触发此方法
onActivated(() => {
    // getOrders()
})

onMounted(() => {
    
})

</script>

<script>
export default {
    name: "Home",
}
</script>

<style lang="less" scoped>
.home-box {
    display: flex;
}
.home-main {
    flex: 1;
    padding: 0 20px 0 0;
}

.home-aside {
    flex: none;
    width: 240px;
}
</style>
